﻿@namespace ThingsGateway.Gateway.Razor

@using ThingsGateway.Blazor.Diagrams.Components.Renderers
@using ThingsGateway.Blazor.Diagrams.Core.Models
<div class="custom-node @(Node.Selected ? " selected" : "")">
    <div class="card" style="width: 250px;">
        <div class="card-body">
            <h6 class="card-title mb-2">@Localizer[Node.Title]</h6>
            <div class="form-group">
            </div>
        </div>
    </div>

    @foreach (var port in Node.Ports)
    {
        <PortRenderer @key="port" Port="port"></PortRenderer>
    }
</div>

@code {
    [Inject]
    IStringLocalizer<ThingsGateway.Gateway.Razor._Imports> Localizer { get; set; }

    [Parameter]
    public NodeModel Node { get; set; }
}
